package com.hornsun.domain.constant.types;

/**
 * Created by 编译中... on 2018/5/31.
 */
public enum UseHealthBeans {
    EXCHANGECOUPON(1,"兑换优惠券");
    private Integer type;
    private String name;

    UseHealthBeans(Integer type , String name){this.type=type;this.name=name;}

    public Integer getType() {
        return type;
    }

    public String getName() {
        return name;
    }

    public static UseHealthBeans fromName(String name) {
        for (UseHealthBeans useHealthBeans : values()) {
            if (useHealthBeans.name.equals(name)){
                return useHealthBeans;
            }
        }
        return null;
    }
}
